-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: not prevent ipfs io requests #1230
fix: not prevent ipfs io requests #1230
Conversation
Deploying with Cloudflare Pages
|
40791be
to
ebc6f59
Compare
@@ -75,11 +75,6 @@ const MINUTE = 1000 * 60 | |||
*/ | |||
function getRateLimitingCharacteristics(gatewayUrl) { | |||
switch (gatewayUrl) { | |||
case 'https://ipfs.io': | |||
return { | |||
RATE_LIMIT_REQUESTS: 800, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we just make this Infinity
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could, but I removed it entirely from calling this function to not have the delay of an async http request to the durable. Also, keeping infinity array size of timestamps might hit Limits of durable object
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense...but...personally I would rather special case "Infinity" as a "limit" than a specific gateway. Maybe in the future we'll have other gateways that do not limit, if that happens we'll have to change code somewhere else than here and I'd rather just have a single place where we define the available gateways and their characteristics rather than scattered.
Unless the additional async request is problematic, I'd keep it there. It also makes the race a bit fairer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fair enough
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made 10 seconds the time to track, so that we do not have a really big array to track
5378c43
to
ed55297
Compare
ed55297
to
31afa03
Compare
31afa03
to
f35e756
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
Needs: